<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui" template="/layout/template.xhtml">
	<ui:define name="body">
	<script language="JavaScript" type="text/javascript">
		window.history.forward(-1);
	</script>
<center><h1 class="title ui-widget-header ui-corner-all">#{message['modulo.comprobante.tittle']}</h1></center>
		
<h:form id="frmComprobanteFormList" prependId="false">

	<p:messages showDetail="true" escape="false" closable="true" />
	
	<p:dataTable id="comproTable" var="c" value="#{comprobanteSearch.comprobanteList}" 
				 emptyMessage="#{message['rsltd.nocencontroregistro']}" resizableColumns="true"  paginatorPosition="bottom"
	   			 paginator="true" rows="10" rowsPerPageTemplate="5,10,15">

			<f:facet name="header">
			<h:outputText value="#{message['lista.comprobante']}" />  
			</f:facet>
				
			<p:column headerText="#{message['lista.comprobante.codigo']}" >
			<h:outputText value="#{c.codcomprobante}" />
			</p:column>

			<p:column headerText="#{message['lista.comprobante.tipo']}" >
			<h:outputText value="#{c.tipocomprobante}" />
			</p:column>
			
			<p:column headerText="#{message['lista.comprobante.proveedor']}" >
			<h:outputText value="#{c.tbProveedor.razonsocial}" />
			</p:column>

			<p:column headerText="#{message['rsltd.verDetalle']}" >
			<p:commandButton
					action="#{comprobanteForm.update}"	icon="ui-icon-search">
			<f:setPropertyActionListener value="#{c}"
					target="#{comprobanteForm.objComprobanteSie}" />
			</p:commandButton>
			</p:column>
				
			</p:dataTable>
</h:form>
</ui:define>
</ui:composition>